<div class="panel-heading">
  <h3 class="panel-title"><%= Spree.t(:order_adjustments) %></h3>
</div>

<table class="table table-bordered adjustments" data-hook="adjustments">
  <thead data-hook="adjustmment_head">
    <tr>
      <th><%= Spree.t(:adjustable) %></th>
      <th><%= Spree.t(:description) %></th>
      <th class="text-center"><%= Spree.t(:amount) %></th>
      <th class="text-center"><%= Spree.t(:status) %></th>
      <th class="actions"></th>
    </tr>
  </thead>
  <tbody>
    <%= render partial: "adjustment", collection: @adjustments %>
  </tbody>
</table>

<% if can?(:edit, Spree::Adjustment) %>
  <div class="panel-footer">
    <div class="row text-center">
      <div class="col-md-6">
        <%= button_to Spree.t(:open_all_adjustments), open_adjustments_admin_order_path(@order), method: :get, class: "btn btn-success" %>
      </div>
      <div class="col-md-6">
        <%= button_to Spree.t(:close_all_adjustments), close_adjustments_admin_order_path(@order), method: :get, class: "btn btn-danger" %>
      </div>
    </div>
  </div>
<% end %>
